home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / config.sub < prev    next >
Encoding:
Text File  |  1995-07-28  |  16.8 KB  |  847 lines

  1. #! /bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. #   Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
  4. # This file is (in principle) common to ALL GNU software.
  5. # The presence of a machine in this file suggests that SOME GNU software
  6. # can handle that machine.  It does not imply ALL GNU software can. 
  7. #
  8. # This file is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. # As a special exception to the GNU General Public License, if you
  23. # distribute this file as part of a program that contains a
  24. # configuration script generated by Autoconf, you may include it under
  25. # the same distribution terms that you use for the rest of that program.
  26.  
  27. # Configuration subroutine to validate and canonicalize a configuration type.
  28. # Supply the specified configuration type as an argument.
  29. # If it is invalid, we print an error message on stderr and exit with code 1.
  30. # Otherwise, we print the canonical config type on stdout and succeed.
  31.  
  32. # This file is supposed to be the same for all GNU packages
  33. # and recognize all the CPU types, system types and aliases
  34. # that are meaningful with *any* GNU software.
  35. # Each package is responsible for reporting which valid configurations
  36. # it does not support.  The user should be able to distinguish
  37. # a failure to support a valid configuration from a meaningless
  38. # configuration.
  39.  
  40. # The goal of this file is to map all the various variations of a given
  41. # machine specification into a single specification in the form:
  42. #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  43. # It is wrong to echo any other type of specification.
  44.  
  45. if [ x$1 = x ]
  46. then
  47.     echo Configuration name missing. 1>&2
  48.     echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  49.     echo "or     $0 ALIAS" 1>&2
  50.     echo where ALIAS is a recognized configuration type. 1>&2
  51.     exit 1
  52. fi
  53.  
  54. # First pass through any local machine types.
  55. case $1 in
  56.     *local*)
  57.         echo $1
  58.         exit 0
  59.         ;;
  60.     *)
  61.     ;;
  62. esac
  63.  
  64. # Separate what the user gave into CPU-COMPANY and OS (if any).
  65. basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  66. if [ $basic_machine != $1 ]
  67. then os=`echo $1 | sed 's/.*-/-/'`
  68. else os=; fi
  69.  
  70. ### Let's recognize common machines as not being operating systems so
  71. ### that things like config.sub decstation-3100 work.  We also
  72. ### recognize some manufacturers as not being operating systems, so we
  73. ### can provide default operating systems below.
  74. case $os in
  75.     -sun*os*)
  76.         # Prevent following clause from handling this invalid input.
  77.         ;;
  78.     -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  79.     -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  80.     -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
  81.     -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
  82.     -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  83.     -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
  84.         os=
  85.         basic_machine=$1
  86.         ;;
  87.     -hiux*)
  88.         os=-hiuxwe2
  89.         ;;
  90.     -sco4)
  91.         os=-sco3.2v4
  92.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  93.         ;;
  94.     -sco3.2.[4-9]*)
  95.         os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  96.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  97.         ;;
  98.     -sco3.2v[4-9]*)
  99.         # Don't forget version if it is 3.2v4 or newer.
  100.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  101.         ;;
  102.     -sco*)
  103.         os=-sco3.2v2
  104.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  105.         ;;
  106.     -isc)
  107.         os=-isc2.2
  108.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  109.         ;;
  110.     -clix*)
  111.         basic_machine=clipper-intergraph
  112.         ;;
  113.     -isc*)
  114.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  115.         ;;
  116.     -lynx*)
  117.         os=-lynxos
  118.         ;;
  119.     -ptx*)
  120.         basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  121.         ;;
  122.     -windowsnt*)
  123.         os=`echo $os | sed -e 's/windowsnt/winnt/'`
  124.         ;;
  125. esac
  126.  
  127. # Decode aliases for certain CPU-COMPANY combinations.
  128. case $basic_machine in
  129.     # Recognize the basic CPU types without company name.
  130.     # Some are omitted here because they have special meanings below.
  131.     tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
  132.         | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
  133.         | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
  134.         | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
  135.         | pdp11 | mips64el | mips64orion | mips64orionel \
  136.         | sparc | mab)
  137.         basic_machine=$basic_machine-unknown
  138.         ;;
  139.     # Object if more than one company name word.
  140.     *-*-*)
  141.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  142.         exit 1
  143.         ;;
  144.     # Recognize the basic CPU types with company name.
  145.     vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \
  146.           | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
  147.           | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  148.           | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
  149.           | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
  150.           | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
  151.           | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \
  152.           | mips64el-* | mips64orion-* | mips64orionel-* | mab-*)
  153.         ;;
  154.     # Recognize names of some NetBSD ports.
  155.     amiga-* | hp300-* | mac68k-* | sun3-* | pmax-*)
  156.         ;;
  157.     # Recognize the various machine names and aliases which stand
  158.     # for a CPU type and a company and sometimes even an OS.
  159.     3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  160.         basic_machine=m68000-att
  161.         ;;
  162.     3b*)
  163.         basic_machine=we32k-att
  164.         ;;
  165.     alliant | fx80)
  166.         basic_machine=fx80-alliant
  167.         ;;
  168.     altos | altos3068)
  169.         basic_machine=m68k-altos
  170.         ;;
  171.     am29k)
  172.         basic_machine=a29k-none
  173.         os=-bsd
  174.         ;;
  175.     amdahl)
  176.         basic_machine=580-amdahl
  177.         os=-sysv
  178.         ;;
  179.     amiga | amiga-*)
  180.         basic_machine=m68k-cbm
  181.         ;;
  182.     amigados)
  183.         basic_machine=m68k-cbm
  184.         os=-amigados
  185.         ;;
  186.     amigaunix | amix)
  187.         basic_machine=m68k-cbm
  188.         os=-sysv4
  189.         ;;
  190.     apollo68)
  191.         basic_machine=m68k-apollo
  192.         os=-sysv
  193.         ;;
  194.     balance)
  195.         basic_machine=ns32k-sequent
  196.         os=-dynix
  197.         ;;
  198.     convex-c1)
  199.         basic_machine=c1-convex
  200.         os=-bsd
  201.         ;;
  202.     convex-c2)
  203.         basic_machine=c2-convex
  204.         os=-bsd
  205.         ;;
  206.     convex-c32)
  207.         basic_machine=c32-convex
  208.         os=-bsd
  209.         ;;
  210.     convex-c34)
  211.         basic_machine=c34-convex
  212.         os=-bsd
  213.         ;;
  214.     convex-c38)
  215.         basic_machine=c38-convex
  216.         os=-bsd
  217.         ;;
  218.     cray | ymp)
  219.         basic_machine=ymp-cray
  220.         os=-unicos
  221.         ;;
  222.     cray2)
  223.         basic_machine=cray2-cray
  224.         os=-unicos
  225.         ;;
  226.     crds | unos)
  227.         basic_machine=m68k-crds
  228.         ;;
  229.     da30 | da30-*)
  230.         basic_machine=m68k-da30
  231.         ;;
  232.     decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  233.         basic_machine=mips-dec
  234.         ;;
  235.     delta | 3300 | motorola-3300 | motorola-delta \
  236.           | 3300-motorola | delta-motorola)
  237.         basic_machine=m68k-motorola
  238.         ;;
  239.     delta88)
  240.         basic_machine=m88k-motorola
  241.         os=-sysv3
  242.         ;;
  243.     dpx20 | dpx20-*)
  244.         basic_machine=rs6000-bull
  245.         os=-bosx
  246.         ;;
  247.     dpx2* | dpx2*-bull)
  248.         basic_machine=m68k-bull
  249.         os=-sysv3
  250.         ;;
  251.     ebmon29k)
  252.         basic_machine=a29k-amd
  253.         os=-ebmon
  254.         ;;
  255.     elxsi)
  256.         basic_machine=elxsi-elxsi
  257.         os=-bsd
  258.         ;;
  259.     encore | umax | mmax)
  260.         basic_machine=ns32k-encore
  261.         ;;
  262.     fx2800)
  263.         basic_machine=i860-alliant
  264.         ;;
  265.     genix)
  266.         basic_machine=ns32k-ns
  267.         ;;
  268.     gmicro)
  269.         basic_machine=tron-gmicro
  270.         os=-sysv
  271.         ;;
  272.     h3050r* | hiux*)
  273.         basic_machine=hppa1.1-hitachi
  274.         os=-hiuxwe2
  275.         ;;
  276.     h8300hms)
  277.         basic_machine=h8300-hitachi
  278.         os=-hms
  279.         ;;
  280.     harris)
  281.         basic_machine=m88k-harris
  282.         os=-sysv3
  283.         ;;
  284.     hp300-*)
  285.         basic_machine=m68k-hp
  286.         ;;
  287.     hp300bsd)
  288.         basic_machine=m68k-hp
  289.         os=-bsd
  290.         ;;
  291.     hp300hpux)
  292.         basic_machine=m68k-hp
  293.         os=-hpux
  294.         ;;
  295.     hp9k2[0-9][0-9] | hp9k31[0-9])
  296.         basic_machine=m68000-hp
  297.         ;;
  298.     hp9k3[2-9][0-9])
  299.         basic_machine=m68k-hp
  300.         ;;
  301.     hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
  302.         basic_machine=hppa1.1-hp
  303.         ;;
  304.     hp9k8[0-9][0-9] | hp8[0-9][0-9])
  305.         basic_machine=hppa1.0-hp
  306.         ;;
  307.     i370-ibm* | ibm*)
  308.         basic_machine=i370-ibm
  309.         os=-mvs
  310.         ;;
  311. # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
  312.     i[345]86v32)
  313.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  314.         os=-sysv32
  315.         ;;
  316.     i[345]86v4*)
  317.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  318.         os=-sysv4
  319.         ;;
  320.     i[345]86v)
  321.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  322.         os=-sysv
  323.         ;;
  324.     i[345]86sol2)
  325.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  326.         os=-solaris2
  327.         ;;
  328.     iris | iris4d)
  329.         basic_machine=mips-sgi
  330.         case $os in
  331.             -irix*)
  332.             ;;
  333.             *)
  334.             os=-irix4
  335.             ;;
  336.         esac
  337.         ;;
  338.     isi68 | isi)
  339.         basic_machine=m68k-isi
  340.         os=-sysv
  341.         ;;
  342.     m88k-omron*)
  343.         basic_machine=m88k-omron
  344.         ;;
  345.     magnum | m3230)
  346.         basic_machine=mips-mips
  347.         os=-sysv
  348.         ;;
  349.     merlin)
  350.         basic_machine=ns32k-utek
  351.         os=-sysv
  352.         ;;
  353.     miniframe)
  354.         basic_machine=m68000-convergent
  355.         ;;
  356.     mips3*-*)
  357.         basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  358.         ;;
  359.     mips3*)
  360.         basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  361.         ;;
  362.     ncr3000)
  363.         basic_machine=i486-ncr
  364.         os=-sysv4
  365.         ;;
  366.     news | news700 | news800 | news900)
  367.         basic_machine=m68k-sony
  368.         os=-newsos
  369.         ;;
  370.     news1000)
  371.         basic_machine=m68030-sony
  372.         os=-newsos
  373.         ;;
  374.     news-3600 | risc-news)
  375.         basic_machine=mips-sony
  376.         os=-newsos
  377.         ;;
  378.     next)
  379.         basic_machine=mab-next
  380.         case $os in
  381.             -nextstep* )
  382.             ;;
  383.             -ns2*)
  384.               os=-nextstep2
  385.             ;;
  386.             *)
  387.               os=-nextstep3
  388.             ;;
  389.         esac
  390.         ;;
  391.     nh3000)
  392.         basic_machine=m68k-harris
  393.         os=-cxux
  394.         ;;
  395.     nh[45]000)
  396.         basic_machine=m88k-harris
  397.         os=-cxux
  398.         ;;
  399.     nindy960)
  400.         basic_machine=i960-intel
  401.         os=-nindy
  402.         ;;
  403.     np1)
  404.         basic_machine=np1-gould
  405.         ;;
  406.     pa-hitachi)
  407.         basic_machine=hppa1.1-hitachi
  408.         os=-hiuxwe2
  409.         ;;
  410.     paragon)
  411.         basic_machine=i860-intel
  412.         os=-osf
  413.         ;;
  414.     pbd)
  415.         basic_machine=sparc-tti
  416.         ;;
  417.     pbb)
  418.         basic_machine=m68k-tti
  419.         ;;
  420.         pc532 | pc532-*)
  421.         case $os in
  422.             -netbsd*)
  423.             basic_machine=pc532-unknown
  424.             ;;
  425.             *)
  426.             basic_machine=ns32k-pc532
  427.             ;;
  428.         esac
  429.         ;;
  430.     pentium-*)
  431.         # We will change tis to say i586 once there has been
  432.         # time for various packages to start to recognize that.
  433.         basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'`
  434.         ;;
  435.     pn)
  436.         basic_machine=pn-gould
  437.         ;;
  438.     ps2)
  439.         basic_machine=i386-ibm
  440.         ;;
  441.     rm[46]00)
  442.         basic_machine=mips-siemens
  443.         ;;
  444.     rtpc | rtpc-*)
  445.         basic_machine=romp-ibm
  446.         ;;
  447.     sequent)
  448.         basic_machine=i386-sequent
  449.         ;;
  450.     sh)
  451.         basic_machine=sh-hitachi
  452.         os=-hms
  453.         ;;
  454.     sps7)
  455.         basic_machine=m68k-bull
  456.         os=-sysv2
  457.         ;;
  458.     spur)
  459.         basic_machine=spur-unknown
  460.         ;;
  461.     sun2)
  462.         basic_machine=m68000-sun
  463.         ;;
  464.     sun2os3)
  465.         basic_machine=m68000-sun
  466.         os=-sunos3
  467.         ;;
  468.     sun2os4)
  469.         basic_machine=m68000-sun
  470.         os=-sunos4
  471.         ;;
  472.     sun3os3)
  473.         basic_machine=m68k-sun
  474.         os=-sunos3
  475.         ;;
  476.     sun3os4)
  477.         basic_machine=m68k-sun
  478.         os=-sunos4
  479.         ;;
  480.     sun4os3)
  481.         basic_machine=sparc-sun
  482.         os=-sunos3
  483.         ;;
  484.     sun4os4)
  485.         basic_machine=sparc-sun
  486.         os=-sunos4
  487.         ;;
  488.     sun4sol2)
  489.         basic_machine=sparc-sun
  490.         os=-solaris2
  491.         ;;
  492.     sun3 | sun3-*)
  493.         basic_machine=m68k-sun
  494.         ;;
  495.     sun4)
  496.         basic_machine=sparc-sun
  497.         ;;
  498.     sun386 | sun386i | roadrunner)
  499.         basic_machine=i386-sun
  500.         ;;
  501.     symmetry)
  502.         basic_machine=i386-sequent
  503.         os=-dynix
  504.         ;;
  505.     tower | tower-32)
  506.         basic_machine=m68k-ncr
  507.         ;;
  508.     udi29k)
  509.         basic_machine=a29k-amd
  510.         os=-udi
  511.         ;;
  512.     ultra3)
  513.         basic_machine=a29k-nyu
  514.         os=-sym1
  515.         ;;
  516.     vaxv)
  517.         basic_machine=vax-dec
  518.         os=-sysv
  519.         ;;
  520.     vms)
  521.         basic_machine=vax-dec
  522.         os=-vms
  523.         ;;
  524.     vxworks960)
  525.         basic_machine=i960-wrs
  526.         os=-vxworks
  527.         ;;
  528.     vxworks68)
  529.         basic_machine=m68k-wrs
  530.         os=-vxworks
  531.         ;;
  532.     xmp)
  533.         basic_machine=xmp-cray
  534.         os=-unicos
  535.         ;;
  536.         xps | xps100)
  537.         basic_machine=xps100-honeywell
  538.         ;;
  539.     none)
  540.         basic_machine=none-none
  541.         os=-none
  542.         ;;
  543.  
  544. # Here we handle the default manufacturer of certain CPU types.  It is in
  545. # some cases the only manufacturer, in others, it is the most popular.
  546.     mips)
  547.         basic_machine=mips-mips
  548.         ;;
  549.     romp)
  550.         basic_machine=romp-ibm
  551.         ;;
  552.     rs6000)
  553.         basic_machine=rs6000-ibm
  554.         ;;
  555.     vax)
  556.         basic_machine=vax-dec
  557.         ;;
  558.     pdp11)
  559.         basic_machine=pdp11-dec
  560.         ;;
  561.     we32k)
  562.         basic_machine=we32k-att
  563.         ;;
  564.     sparc)
  565.         basic_machine=sparc-sun
  566.         ;;
  567.         cydra)
  568.         basic_machine=cydra-cydrome
  569.         ;;
  570.     orion)
  571.         basic_machine=orion-highlevel
  572.         ;;
  573.     orion105)
  574.         basic_machine=clipper-highlevel
  575.         ;;
  576.     *)
  577.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  578.         exit 1
  579.         ;;
  580. esac
  581.  
  582. # Here we canonicalize certain aliases for manufacturers.
  583. case $basic_machine in
  584.     *-digital*)
  585.         basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  586.         ;;
  587.     *-commodore*)
  588.         basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  589.         ;;
  590.     *)
  591.         ;;
  592. esac
  593.  
  594. # Decode manufacturer-specific aliases for certain operating systems.
  595.  
  596. if [ x"$os" != x"" ]
  597. then
  598. case $os in
  599.     # -solaris* is a basic system type, with this one exception.
  600.     -solaris1 | -solaris1.*)
  601.         os=`echo $os | sed -e 's|solaris1|sunos4|'`
  602.         ;;
  603.     -solaris)
  604.         os=-solaris2
  605.         ;;
  606.     -unixware* | svr4*)
  607.         os=-sysv4
  608.         ;;
  609.     -gnu/linux*)
  610.         os=`echo $os | sed -e 's|gnu/linux|linux|'`
  611.         ;;
  612.     # First accept the basic system types.
  613.     # The portable systems comes first.
  614.     # Each alternative must end in a *, to match a version number.
  615.     # -sysv* is not here because it comes later, after sysvr4.
  616.     -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  617.           | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \
  618.           | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  619.           | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  620.           | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  621.           | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
  622.           | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
  623.           | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
  624.           | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta | -udi | -eabi)
  625.         ;;
  626.     -sunos5*)
  627.         os=`echo $os | sed -e 's|sunos5|solaris2|'`
  628.         ;;
  629.     -sunos6*)
  630.         os=`echo $os | sed -e 's|sunos6|solaris3|'`
  631.         ;;
  632.     -osfrose*)
  633.         os=-osfrose
  634.         ;;
  635.     -osf*)
  636.         os=-osf
  637.         ;;
  638.     -utek*)
  639.         os=-bsd
  640.         ;;
  641.     -dynix*)
  642.         os=-bsd
  643.         ;;
  644.     -acis*)
  645.         os=-aos
  646.         ;;
  647.     -ctix* | -uts*)
  648.         os=-sysv
  649.         ;;
  650.     # Preserve the version number of sinix5.
  651.     -sinix5.*)
  652.         os=`echo $os | sed -e 's|sinix|sysv|'`
  653.         ;;
  654.     -sinix*)
  655.         os=-sysv4
  656.         ;;
  657.     -triton*)
  658.         os=-sysv3
  659.         ;;
  660.     -oss*)
  661.         os=-sysv3
  662.         ;;
  663.     -svr4)
  664.         os=-sysv4
  665.         ;;
  666.     -svr3)
  667.         os=-sysv3
  668.         ;;
  669.     -sysvr4)
  670.         os=-sysv4
  671.         ;;
  672.     # This must come after -sysvr4.
  673.     -sysv*)
  674.         ;;
  675.     -xenix)
  676.         os=-xenix
  677.         ;;
  678.     -none)
  679.         ;;
  680.     *)
  681.         # Get rid of the `-' at the beginning of $os.
  682.         os=`echo $os | sed 's/[^-]*-//'`
  683.         echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  684.         exit 1
  685.         ;;
  686. esac
  687. else
  688.  
  689. # Here we handle the default operating systems that come with various machines.
  690. # The value should be what the vendor currently ships out the door with their
  691. # machine or put another way, the most popular os provided with the machine.
  692.  
  693. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  694. # "-sun"), then you have to tell the case statement up towards the top
  695. # that MANUFACTURER isn't an operating system.  Otherwise, code above
  696. # will signal an error saying that MANUFACTURER isn't an operating
  697. # system, and we'll never get to this point.
  698.  
  699. case $basic_machine in
  700.     *-acorn)
  701.         os=-riscix1.2
  702.         ;;
  703.         pdp11-*)
  704.         os=-none
  705.         ;;
  706.     *-dec | vax-*)
  707.         os=-ultrix4.2
  708.         ;;
  709.     m68*-apollo)
  710.         os=-domain
  711.         ;;
  712.     i386-sun)
  713.         os=-sunos4.0.2
  714.         ;;
  715.     m68000-sun)
  716.         os=-sunos3
  717.         # This also exists in the configure program, but was not the
  718.         # default.
  719.         # os=-sunos4
  720.         ;;
  721.     *-tti)    # must be before sparc entry or we get the wrong os.
  722.         os=-sysv3
  723.         ;;
  724.     sparc-* | *-sun)
  725.         os=-sunos4.1.1
  726.         ;;
  727.     *-ibm)
  728.         os=-aix
  729.         ;;
  730.     *-hp)
  731.         os=-hpux
  732.         ;;
  733.     *-hitachi)
  734.         os=-hiux
  735.         ;;
  736.     i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  737.         os=-sysv
  738.         ;;
  739.     *-cbm)
  740.         os=-amigados
  741.         ;;
  742.     *-dg)
  743.         os=-dgux
  744.         ;;
  745.     *-dolphin)
  746.         os=-sysv3
  747.         ;;
  748.     m68k-ccur)
  749.         os=-rtu
  750.         ;;
  751.     m88k-omron*)
  752.         os=-luna
  753.         ;;
  754.     *-sequent)
  755.         os=-ptx
  756.         ;;
  757.     *-crds)
  758.         os=-unos
  759.         ;;
  760.     *-ns)
  761.         os=-genix
  762.         ;;
  763.     i370-*)
  764.         os=-mvs
  765.         ;;
  766.     *-next)
  767.         os=-nextstep3
  768.         ;;
  769.     i[345]86-*)
  770.         os=-sco3.2v2
  771.         ;;
  772.     *-gould)
  773.         os=-sysv
  774.         ;;
  775.         *-highlevel)
  776.         os=-bsd
  777.         ;;
  778.     *-encore)
  779.         os=-bsd
  780.         ;;
  781.         *-sgi)
  782.         os=-irix
  783.         ;;
  784.         *-siemens)
  785.         os=-sysv4
  786.         ;;
  787.     *-masscomp)
  788.         os=-rtu
  789.         ;;
  790.     *)
  791.         os=-none
  792.         ;;
  793. esac
  794. fi
  795.  
  796. # Here we handle the case where we know the os, and the CPU type, but not the
  797. # manufacturer.  We pick the logical manufacturer.
  798. vendor=unknown
  799. case $basic_machine in
  800.     *-unknown)
  801.         case $os in
  802.             -riscix*)
  803.                 vendor=acorn
  804.                 ;;
  805.             -sunos*)
  806.                 vendor=sun
  807.                 ;;
  808.             -lynxos*)
  809.                 vendor=lynx
  810.                 ;;
  811.             -aix*)
  812.                 vendor=ibm
  813.                 ;;
  814.             -hpux*)
  815.                 vendor=hp
  816.                 ;;
  817.             -hiux*)
  818.                 vendor=hitachi
  819.                 ;;
  820.             -unos*)
  821.                 vendor=crds
  822.                 ;;
  823.             -dgux*)
  824.                 vendor=dg
  825.                 ;;
  826.             -luna*)
  827.                 vendor=omron
  828.                 ;;
  829.             -genix*)
  830.                 vendor=ns
  831.                 ;;
  832.             -mvs*)
  833.                 vendor=ibm
  834.                 ;;
  835.             -ptx*)
  836.                 vendor=sequent
  837.                 ;;
  838.             -vxworks*)
  839.                 vendor=wrs
  840.                 ;;
  841.         esac
  842.         basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  843.         ;;
  844. esac
  845.  
  846. echo $basic_machine$os
  847.